load("@fbsource//tools/build_defs:rust_binary.bzl", "rust_binary")
load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("build_infra")

rust_library(
    name = "dice-examples",
    srcs = glob(
        ["src/**/*.rs"],
    ),
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:derive_more",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:ref-cast",
        "//buck2/allocative/allocative:allocative",
        "//buck2/dice/dice:dice",
        "//buck2/dice/dice_error:dice_error",
        "//buck2/dice/dice_futures:dice_futures",
        "//buck2/gazebo/dupe:dupe",
        "//buck2/gazebo/gazebo:gazebo",
    ],
)

rust_binary(
    name = "many_cancel",
    srcs = ["bin/many_cancel.rs"],
    deps = [
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:derive_more",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:tokio",
        "//buck2/allocative/allocative:allocative",
        "//buck2/dice/dice:dice",
        "//buck2/dice/dice_futures:dice_futures",
        "//buck2/gazebo/dupe:dupe",
    ],
)
